//// apply online validation /////
$(document).ready(function() {
      $("#apply_online").validate({
        rules: {
		  pname: {// compound rule
          required: true,
        },
		newname: {// compound rule
          required: true,
		 },
		vehicle_year: {// compound rule
          required: true,
		},
		vehiname: {// compound rule
          required: true,
		 },
		npieces: {// compound rule
          required: true,
		 },
		 vehicle_registration: {// compound rule
          required: true,
		},
		phone: {// compound rule
          required: true,
		},
          email: {// compound rule
          required: true,
          email: true,
		  minlength:5,
		  maxlength:50
        },          
		fname: {// compound rule
          required: true,
		 },
		address: {// compound rule
          required: true,
		 },
		city: {// compound rule
          required: true,
		 },
		zipcode: {// compound rule
          required: true,
		 },
		charity: {// compound rule
          required: true,
		 },
		scrap: {// compound rule
          required: true,
		 },
		query:{   
           required: true   
		}
		},
		messages: {
          query: "Please enter your comments."
        }
      });
    });

//// end apply online validation ///